#ifndef __TC_SCENERENDERER_H__
#define __TC_SCENERENDERER_H__
#include "TCSingleton.h"
#include "TCVector2f.h"
NS_TC_BEGIN
class TCSceneRenderer:public TCSingleton<TCSceneRenderer>{
	friend class TCSingleton<TCSceneRenderer>;
private:
	float* _vertexBuffer;
	float* _uvBuffer;
	unsigned short* _indicesBuffer;
	~TCSceneRenderer();
	TCSceneRenderer();
	int _startBatchIndex;
	int _size;
	int _lastTextureID;
	int _capacity;
	void drawBatch();
	void checkAndExpand();
public:

	void render(const int& textureID,Vector2f* vertex,Vector2f* uv);

	void flush();
};
NS_TC_END
#endif